package com.example.keen1;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
   Button bnt1, bnt2, bnt3, bnt4, bnt5;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bnt1 = findViewById(R.id.btn1);
        bnt2 = findViewById(R.id.btn2);
        bnt3 = findViewById(R.id.btn3);
        bnt4 = findViewById(R.id.btn4);
        bnt5 = findViewById(R.id.btn5);
        bnt1.setOnClickListener(this);
        bnt2.setOnClickListener(this);
        bnt3.setOnClickListener(this);
        bnt4.setOnClickListener(this);
        bnt5.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()){
            case R.id.btn1:
                intent.setClass(this,CalculateActivity.class);
                break;
            case R.id.btn2:
                intent.setClass(this,CalculateActivity.class);
                break;
            case R.id.btn3:
                intent.setClass(this,CalculateActivity.class);
                break;
            case R.id.btn4:
                intent.setClass(this,CalculateActivity.class);
                break;
            case R.id.btn5:
                intent.setClass(this,CalculateActivity.class);
                break;
        }
    }
}
